//package com.atguigu.controller;
//
//import com.atguigu.result.RetVal;
//import com.atguigu.utils.MinioUploader;
//import org.checkerframework.checker.units.qual.A;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//
//@RestController
//@RequestMapping("/product/brand")
//public class MinioController {
//    @Autowired
//    private MinioUploader minioUploader;
//
//    //1.文件上传 3个单个文件
//    @PostMapping("minioUpload")
//    public RetVal fileUpload(@RequestPart("avatar") MultipartFile avatar,
//                             @RequestPart("life") MultipartFile life,
//                             @RequestPart("secret") MultipartFile secret) throws Exception {
//        System.out.println("**********");
//        return RetVal.ok();
//    }
//
//    //2.文件上传 2个单个文件, 1个多个文件
//    @PostMapping("minioUpload")
//    public RetVal fileUpload(@RequestPart("avatar") MultipartFile avatar,
//                             @RequestPart("life") MultipartFile life,
//                             @RequestPart("secret") MultipartFile[] secret) throws Exception {
//        System.out.println("**********");
//        return RetVal.ok();
//    }
//
//    //3.文件上传 1个名字,2个单个文件, 1个多个文件
//    @PostMapping("minioUpload")
//    public RetVal fileUpload(@RequestParam("userName") String userName,
//                             @RequestPart("avatar") MultipartFile avatar,
//                             @RequestPart("life") MultipartFile life,
//                             @RequestPart("secret") MultipartFile[] secret) throws Exception {
//        System.out.println("**********");
//        return RetVal.ok();
//    }
//
//    //3.文件上传 3个前端参数名称相同的文件
//    @PostMapping("minioUpload")
//    public RetVal fileUpload(@RequestPart("images") MultipartFile[] images) throws Exception {
//        System.out.println("**********");
//        return RetVal.ok();
//    }
//}
